/*
 * @Author: your name
 * @Date: 2021-04-12 00:21:10
 * @LastEditTime: 2021-12-01 14:08:06
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /full_flutter/lib/ui/helper/theme_helper.dart
 */
import 'package:flutter/material.dart';

class ThemeHelper {
  static InputDecorationTheme inputDecorationTheme(ThemeData theme) {
    var primaryColor = theme.primaryColor;
    var dividerColor = theme.dividerColor;
    var errorColor = theme.errorColor;
    var disabledColor = theme.disabledColor;

    var width = 0.5;

    return InputDecorationTheme(
      hintStyle: TextStyle(fontSize: 14),
      errorBorder: UnderlineInputBorder(
        borderSide: BorderSide(width: width, color: errorColor),
      ),
      focusedErrorBorder: UnderlineInputBorder(
        borderSide: BorderSide(width: 0.7, color: errorColor),
      ),
      focusedBorder: UnderlineInputBorder(
        borderSide: BorderSide(width: width, color: primaryColor),
      ),
      enabledBorder: UnderlineInputBorder(
        borderSide: BorderSide(width: width, color: dividerColor),
      ),
      border: UnderlineInputBorder(
        borderSide: BorderSide(width: width, color: dividerColor),
      ),
      disabledBorder: UnderlineInputBorder(
        borderSide: BorderSide(width: width, color: disabledColor),
      ),
    );
  }
}
